<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
</head>
<body>
<script>
	var script = document.createElement('script');
	script.type='text/javascript';
	script.src = 'http://www.domain2.com:8080/login?user=admain&callback=onBack';

	document.head.appendChild(script);


	function onBack(res){
		console.log(res);
		console.log(JSON.stringify(res));
	}


	//onBack({"status":true,"user" : "admain"});
</script>	
</body>
</html>